with authentication;
with currency;
package bank_account is
   MaxAccounts : constant natural := authentication.MaxUsers;

   type account is private;
   type accountPtr is access account;

   type accountArray is array (1..MaxAccounts) of account;

   procedure deselectAccount;
   procedure save(fileName : String);
   
   function createAccount ( ID : Integer ) return Boolean;
   function deleteAccount ( ID : Integer ) return Boolean;
   function selectAccount ( ID : Integer ) return Boolean;
   function deposit ( amount : currency.dollar ) return currency.dollar;
   function withdraw ( amount : currency.dollar ) return currency.dollar;
   function getBalance return currency.dollar;

    no_account_selected : exception;

private
    type account is
	record
	    ID : Integer := -1;
	    balance : currency.dollar := currency.float_to_dollar(0.0);
	    is_null : Boolean := true;
	end record;
end bank_account;
